From fcd0e226300c0bb0917fdf7c464157f31ab3b1be Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 9 Mar 2010 17:53:01 +0000 Subject: [PATCH] tmem: typo causes incorrect return on out-of-memory This classic typo in tmem would result in a false positive report on a tmem "put" operation if a (unfragmented) page of memory is completely unavailable. Signed-off-by: Dan Magenheimer --- xen/common/tmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/tmem.c b/xen/common/tmem.c index c2f6c74f1f..42f4569dbc 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -1308,7 +1308,7 @@ static NOINLINE int do_tmem_put(pool_t *pool, copy_uncompressed: if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL ) { - ret == -ENOMEM; + ret = -ENOMEM; goto delete_and_free; } /* tmh_copy_from_client properly handles len==0 (TMEM_NEW_PAGE) */ -- 2.30.2